$thumb could be null
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 12 Aug 2008 17:32:37 +0000 (17:32 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 12 Aug 2008 17:32:37 +0000 (17:32 +0000)
includes/filerepo/File.php

index 5b9a71e..b82f1c4 100644 (file)
@@ -582,7 +582,7 @@ abstract class File {
                        // Purge. Useful in the event of Core -> Squid connection failure or squid 
                        // purge collisions from elsewhere during failure. Don't keep triggering for 
                        // "thumbs" which have the main image URL though (bug 13776)
-                       if ( $wgUseSquid && ($thumb->isError() || $thumb->getUrl() != $this->getURL()) ) {
+                       if ( $wgUseSquid && ( !$thumb || $thumb->isError() || $thumb->getUrl() != $this->getURL()) ) {
                                SquidUpdate::purge( array( $thumbUrl ) );
                        }
                } while (false);